<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
	<meta charset="UTF-8">
	<title>后台管理系统</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
      <link rel="stylesheet" href="/themes/active/css/app.v2.css" type="text/css" />
      <link rel="stylesheet" type="text/css" href="/themes/active/css/fileinput.css">
</head>
<body>
<section class="vbox">
	<header class="bg-dark dk header navbar navbar-fixed-top-xs">
    <div class="navbar-header aside-md"> <a class="btn btn-link visible-xs" data-toggle="class:nav-off-screen" data-target="#nav"> <i class="fa fa-bars"></i> </a> <a  class="navbar-brand" ><!--  <img src="images/logo.png" class="m-r-sm">-->数据管理系统</a><!--  <a class="btn btn-link visible-xs" data-toggle="dropdown" data-target=".nav-user"> <i class="fa fa-cog"></i> </a>  --></div>
    <ul class="nav navbar-nav hidden-xs">
     
    </ul>
    <ul class="nav navbar-nav navbar-right hidden-xs nav-user">
       <li class="dropdown"> <a  class="dropdown-toggle" href="/active/updatePwd.do" >修改密码<b class="caret"></b> </a> </li>
    </ul>
  </header>
  <section>
    <section class="hbox stretch"> 
      <aside class="bg-dark lter aside-md hidden-print" id="nav">
        <section class="vbox">
          <section class="w-f scrollable">
            <div class="slim-scroll" data-height="auto" data-disable-fade-out="true" data-distance="0" data-size="5px" data-color="#333333">
              <nav class="nav-primary hidden-xs">
                <ul class="nav">
                  <li><a href="index.html" class="active"><i class="fa fa-cog icon"><b class="bg-warning"></b></i><span class="pull-right"><i class="fa fa-angle-down text"></i><i class="fa fa-angle-up text-active"></i></span><span>基础设置</span></a>
                    <ul class="nav lt">
                      <li><a href="active/categoryController/list.do?type=1"><i class="fa fa-angle-right"></i><span>一级分类</span></a></li>
                      <li><a href="active/categoryController/list.do?type=2"><i class="fa fa-angle-right"></i><span>二级分类</span></a></li>
                      <li><a href="/active/addressController/list.do"><i class="fa fa-angle-right"></i><span>地址管理</span></a></li>
                    </ul>
                  </li>
                  <li ><a href="#"><i class="fa fa-user icon"><b class="bg-success"></b></i><span class="pull-right"><i class="fa fa-angle-down text"></i><i class="fa fa-angle-up text-active"></i></span><span>用户相关</span></a>
                    <ul class="nav lt">
                      <li><a href="/active/activeUserController/list.do"><i class="fa fa-angle-right"></i><span>用户信息</span></a></li>
                    </ul>
                  </li>
                  <li  class="active" ><a href="#pages"><i class="fa fa-file-text icon"><b class="bg-primary"></b></i><span class="pull-right"><i class="fa fa-angle-down text"></i> <i class="fa fa-angle-up text-active"></i> </span><span>活动相关</span> </a>
                    <ul class="nav lt">
                      <li><a href="active/activeController/list.do"><i class="fa fa-angle-right"></i><span>活动相关</span></a></li>
                      <li><a href="active/bannerController/list.do"><i class="fa fa-angle-right"></i><span>头图管理</span></a></li>
                       <li><a href="active/photoController/list.do"><i class="fa fa-angle-right"></i><span>相册管理</span></a></li>
                    </ul>
                  </li>
                  <li><a href=""><i class="fa fa-envelope-o icon"><b class="bg-primary dker"></b> </i> <span class="pull-right"><i class="fa fa-angle-down text"></i> <i class="fa fa-angle-up text-active"></i> </span><span>反馈描述</span></a> 
                    <ul class="nav lt">
                      <li><a href="active/feedbackController/list.do"><i class="fa fa-angle-right"></i><span>反馈相关</span></a></li>
                    </ul>
                  </li>
                </ul>
              </nav>
            </div>              
          </section>
        </section>
      </aside>
      <section id="content">
        <section class="panel panel-1 panel-default">
           <header class="panel-heading">修改密码</header>
           <div class="row text-sm wrapper">
              <div>
                <a href="#modal_banner" data-toggle="modal" class="btn btn-s-md btn-danger btn-rounded" style="float: right;" id="btn_add_banner">添加头图</a>
              </div>
          </div>
          <div class="table-responsive">
            <table class="table table-striped b-t b-light text-sm" style="width: 400px;">
              <thead>
                <tr>
                  <th>请输入原始密码：</th>
                   <th><input type="password" class="form-control" placeholder="请输入原始密码" id="oldPwd"></th>
                </tr>
                <tr>
                   <th>请输入新密码：</th>
                   <th><input type="password" class="form-control" placeholder="请输入新密码" id="newPwd"></th>
                </tr>
                <tr>
                  <th>请确认密码：</th>
                   <th><input type="password" class="form-control" placeholder="请确认密码" id="rePwd"></th>
                </tr>
				 <tr><th colspan="2">
				 	 <button type="button" class="btn btn-s-md btn-success" onclick="changePwd()" style="display:block;margin: 20px auto 0"  >确认</button>
				 </th></tr>                 
              </thead>
            </table>
          </div>
        </section>
      </section>
    </section>
  </section>
</section>
<script src="/themes/active/js/app.v2.js"></script>
<script src="http://cdn.bootcss.com/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>
<script src="/themes/active/js/commonPage.js"></script>
<script type="text/javascript">
function changePwd(){
	var _old = $('#oldPwd').val();
	var _new = $('#newPwd').val();
	var _re = $('#rePwd').val();
	if(_old==null||''==_old){
		alert('原始密码不能为空！');
	}else if(_new==null||''==_new){
		alert('新密码不能为空！');
	}else if(_re!=_new){
		alert('两次密码不一致！');
	}else{
		var params = 'old='+_old+'&pwd='+_new;
		$.ajax({
			url:'/active/updatePwdData.html',
			type:'post',
			data:params,
			dataType:'json',
			success:function(res){
				if('success'==res.status){
					alert('密码修改成功，下次登录请使用新密码！');
				}else{
					alert('原始密码不正确！');
				}
			}
		})
	}
}
</script>
</body>
</html>